from django.db import models

# Create your models here.


class Call_Ticket(models.Model):
    appSid = models.CharField('应用id',max_length=64,default='')
    conversationSid = models.CharField('会话唯一标识',max_length=64,default='')
    callType = models.CharField('呼叫类型',choices=(('1','拨号呼入'),('2','后台外呼'),('3','拨号外呼'),('4','点击外呼')),max_length=11,default='')
    userNumber = models.CharField('用户电话号码',max_length=32,default='')
    userArea = models.CharField('用户电话号码地区',max_length=64,default='')
    agentNo = models.CharField('座席工号',max_length=64,default='')
    agentNumber = models.CharField('座席号码',max_length=64,default='')
    userCli = models.CharField('用户侧显号',max_length=64,default='')
    agentCli = models.CharField('坐席侧显号',max_length=64,default='')
    accessNumber = models.CharField('接入号',max_length=64,default='')
    queueId = models.CharField('队列标识',max_length=64,default='')
    queueTime = models.CharField('排队时长',max_length=32,default='')
    startTime = models.CharField('开始时间',max_length=32,default='')
    answerTime = models.CharField('应答时间',max_length=32,default='')
    ringTime = models.CharField('振铃时间',max_length=32,default='')
    connectTime = models.CharField('通话开始时间',max_length=32,default='')
    endTime = models.CharField('结束时间',max_length=32,default='')
    status = models.CharField('呼叫结果状态',max_length=11,default='')
    cause = models.CharField('外呼失败原因',max_length=255,default='')
    endReason = models.CharField('"1":用户挂机，"2":坐席挂机',choices=(('1','用户挂机'),('2','坐席挂机')),max_length=11,default='')
    recordUrl = models.CharField('录音地址',max_length=255,default='')
    userData = models.CharField('应用自定义数据',max_length=255,default='')
    surveyInput = models.CharField('满意度评价',max_length=64,default='')
    error = models.CharField('异常信息',max_length=255,default='无')
    class Meta:
        db_table = 'zb_call_ticket'


